﻿using UnityEngine;
using UnityEngine.UI;

using System.Collections;
using VFramework;
using UnityEngine.EventSystems;

public class UIMain : MonoBehaviour {


    public VUIButton fireBtn;

    private float fireBtnTouchBeganTime = 0;

	// Use this for initialization
	void Start () {

        fireBtn.onTouchBegan += delegate (VUIButton sender, PointerEventData eventData)
        {
            fireBtnTouchBeganTime = Time.time;
        };

        fireBtn.onTouchEnd += delegate (VUIButton sender, PointerEventData eventData)
        {
            EventMgr.getInstance().dispatchEvent(GameEvent.PLAY_FIRE, (Time.time - fireBtnTouchBeganTime));
        };
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}
